/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_Studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#include "stdafx.h"
#include "节点数据声明.h"



//S_渲染世界* S_节点数据::g_默认渲染世界 = nullptr;



std::string f_nodeCtx_相对路径补全(const std::string path) {
	std::string 拼接路径;
	if (path.size() > 2 && path.substr(0, 2) == "//") {
		拼接路径 = f_str_u16_to_u8(S_引擎配置::g_工程文件路径) + path.substr(2, path.size() - 1);
	}
	else {
		return path;
	}
	return 拼接路径;
}

std::filesystem::path f_nodeCtx_相对路径补全(const std::filesystem::path& path) {
	std::u16string 拼接路径 = path.generic_u16string();

	if (拼接路径.size() > 2 && 拼接路径.substr(0, 2) == u"//") {
		拼接路径 = S_引擎配置::g_工程文件路径 + 拼接路径.substr(2, 拼接路径.size() - 1);
	}
	else {
		return path;
	}
	return 拼接路径;
}











